<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickevents.cpp -->
  <title>EventPoint QML 类型 | Qt Quick 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtquick-index.html">Qt Quick 模块</a></td><td ><a href="qtquick-qmlmodule.html">QML类型</a></td><td >EventPoint QML 类型</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">目录</a></h3>
<ul>
<li class="level1"><a href="#properties">属性</a></li>
<li class="level1"><a href="#details">详细信息</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">EventPoint QML 类型</h1>
<span class="subtitle"></span>
<!-- $$$EventPoint-brief -->
<p>Provides information about an individual point within a <a href="qml-qtquick-pointerevent.html">PointerEvent</a>. <a href="#details">更多...</a></p>
<!-- @@@EventPoint -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> 导入语句：</td><td class="memItemRight bottomAlign"> import QtQuick 2.12</td></tr></table></div><ul>
<li><a href="qml-qtquick-eventpoint-members.html">所有成员的列表，包括继承成员</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">属性</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#accepted-prop">accepted</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#pointId-prop">pointId</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#position-prop">position</a></b></b> : point</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#sceneGrabPosition-prop">sceneGrabPosition</a></b></b> : point</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#scenePosition-prop">scenePosition</a></b></b> : point</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#scenePressPosition-prop">scenePressPosition</a></b></b> : point</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#state-prop">state</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#timeHeld-prop">timeHeld</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-eventpoint.html#velocity-prop">velocity</a></b></b> : vector2d</li>
</ul>
<!-- $$$EventPoint-description -->
<a name="details"></a>
<h2 id="details">详细信息</h2>
<p>A <a href="qml-qtquick-pointerevent.html">PointerEvent</a> contains an <a href="qml-qtquick-eventpoint.html">EventPoint</a> for each point of contact: one corresponding to the mouse cursor, or one for each finger touching a touchscreen.</p>
<p><b>请参考 </b><a href="qml-qtquick-pointerevent.html">PointerEvent</a> 和 <a href="qml-qtquick-pointerhandler.html">PointerHandler</a>。</p>
<!-- @@@EventPoint -->
<h2>属性文档</h2>
<!-- $$$accepted -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="accepted-prop">
<td class="tblQmlPropNode"><p>
<a name="accepted-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">accepted</span> : <span class="type"><a href="../qtqml/qml-bool.html">bool</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Setting <i>accepted</i> to true prevents the event from being propagated to Items below the <a href="qml-qtquick-pointerhandler.html">PointerHandler</a>'s Item.</p>
<p>Generally, if the handler acts on the mouse event, then it should be accepted so that items lower in the stacking order do not also respond to the same event.</p>
</div></div><!-- @@@accepted -->
<br/>
<!-- $$$pointId -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="pointId-prop">
<td class="tblQmlPropNode"><p>
<a name="pointId-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">pointId</span> : <span class="type"><a href="../qtqml/qml-int.html">int</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the ID of the event, if any.</p>
<p>Touchpoints have automatically-incrementing IDs: each time the user presses a finger against the touchscreen, it will be a larger number. In other cases, it will be -1.</p>
<p><b>请参考 </b><a href="qml-qtquick-eventtouchpoint.html#uniqueId-prop">uniqueId</a>。</p>
</div></div><!-- @@@pointId -->
<br/>
<!-- $$$position -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="position-prop">
<td class="tblQmlPropNode"><p>
<a name="position-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">position</span> : <span class="type"><a href="../qtqml/qml-point.html">point</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the coordinates of the position supplied by the event, relative to the upper-left corner of the Item which has the <a href="qml-qtquick-pointerhandler.html">PointerHandler</a>. If a contact patch is available from the pointing device, this point represents its centroid.</p>
</div></div><!-- @@@position -->
<br/>
<!-- $$$sceneGrabPosition -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="sceneGrabPosition-prop">
<td class="tblQmlPropNode"><p>
<a name="sceneGrabPosition-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">sceneGrabPosition</span> : <span class="type"><a href="../qtqml/qml-point.html">point</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the scene-relative position at which the <a href="qml-qtquick-eventpoint.html">EventPoint</a> was located when setGrabber() was called most recently.</p>
</div></div><!-- @@@sceneGrabPosition -->
<br/>
<!-- $$$scenePosition -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="scenePosition-prop">
<td class="tblQmlPropNode"><p>
<a name="scenePosition-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">scenePosition</span> : <span class="type"><a href="../qtqml/qml-point.html">point</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the coordinates of the position supplied by the event, relative to the scene. If a contact patch is available from the <a href="qml-qtquick-pointerevent.html#device-prop">device</a>, this point represents its centroid.</p>
</div></div><!-- @@@scenePosition -->
<br/>
<!-- $$$scenePressPosition -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="scenePressPosition-prop">
<td class="tblQmlPropNode"><p>
<a name="scenePressPosition-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">scenePressPosition</span> : <span class="type"><a href="../qtqml/qml-point.html">point</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the scene-relative position at which the press event (on a touch device) or most recent change in QQuickPointerEvent::buttons() (on a mouse or tablet stylus) occurred.</p>
</div></div><!-- @@@scenePressPosition -->
<br/>
<!-- $$$state -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="state-prop">
<td class="tblQmlPropNode"><p>
<a name="state-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">state</span> : <span class="type"><a href="../qtqml/qml-int.html">int</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property tells what the user is currently doing at this point.</p>
<p>It can be one of:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>Pressed</code></td><td class="topAlign">The user's finger is now pressing a touchscreen, button or stylus which was not pressed already</td></tr>
<tr><td class="topAlign"><code>Updated</code></td><td class="topAlign">The touchpoint or position is being moved, with no change in pressed state</td></tr>
<tr><td class="topAlign"><code>Stationary</code></td><td class="topAlign">The touchpoint or position is not being moved, and there is also no change in pressed state</td></tr>
<tr><td class="topAlign"><code>Released</code></td><td class="topAlign">The user's finger has now released a touch point, button or stylus which was pressed</td></tr>
</table></div>
</div></div><!-- @@@state -->
<br/>
<!-- $$$timeHeld -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="timeHeld-prop">
<td class="tblQmlPropNode"><p>
<a name="timeHeld-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">timeHeld</span> : <span class="type"><a href="../qtqml/qml-real.html">real</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the amount of time in seconds that the button or touchpoint has been held. It can be used to detect a &quot;long press&quot;, and can drive an animation to show progress toward activation of the &quot;long press&quot; action.</p>
</div></div><!-- @@@timeHeld -->
<br/>
<!-- $$$velocity -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="velocity-prop">
<td class="tblQmlPropNode"><p>
<a name="velocity-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">velocity</span> : <span class="type"><a href="qml-vector2d.html">vector2d</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds average recent velocity: how fast and in which direction the event point has been moving recently.</p>
</div></div><!-- @@@velocity -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
